<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class OrderInfo extends Model
{
    protected $table = 'order_info';

    use SoftDeletes;

    protected $fillable = [
		'order_id','order_sn','goods_id','goods_name','sku_list','number','price','thumb'
	];

    /**
     * 一对一关联商品
     * User: Clannad ~ ☆
     * DataTime：2020/7/14 0014 17:33
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function goods()
    {
        return $this->hasOne(Goods::class,'id','goods_id');
    }
}
